import request from '@/utils/request'

export function getPrograms(query) {
  return request({
    url: '/messenger/message/getList',
    method: 'post',
    data: query
  })
}

export function fetchMessage(id) {
  return request({
    url: '/messenger/message/getDetail',
    method: 'post',
    data: { id }
  })
}

export function readMessageByID(id) {
  return request({
    url: '/messenger/message/read',
    method: 'post',
    data: id
  })
}

export function withdrawMessageByID(id) {
  return request({
    url: '/messenger/message/withdraw',
    method: 'post',
    data: id
  })
}

export function removeMessageByID(id) {
  return request({
    url: '/messenger/message/delete',
    method: 'post',
    data: id
  })
}

export function saveMessage(formdata) {
  return request({
    url: '/messenger/message/save',
    method: 'post',
    data: formdata
  })
}

export function sendMessageByID(id) {
  return request({
    url: '/messenger/message/send',
    method: 'post',
    data: id
  })
}

